package com.link2room.quintesson.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2017/4/6.
 */
@Entity
@Table(name = "taobao_xroomtype")
@DynamicInsert
public class TaobaoXroomtype extends BaseEntity{
    private String outerRid;
    private Long rid;
    private String rmtype;
    private String name;
    private Long maxOccupancy;
    private Long matchStatus;
    private String matchInfo;
    private String area;
    private String floor;
    private String bedType;
    private String bedSize;
    private String internet;
    private String service;
    private Long windowType;
    private Long srid;
    private String extend;
    private String vendor;
    private String isMatch;

    @Basic
    @Column(name = "outer_rid", nullable = false, length = 32)
    public String getOuterRid() {
        return outerRid;
    }

    public void setOuterRid(String outerRid) {
        this.outerRid = outerRid;
    }

    @Basic
    @Column(name = "rid", nullable = true)
    public Long getRid() {
        return rid;
    }

    public void setRid(Long rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "rmtype", nullable = false, length = 32)
    public String getRmtype() {
        return rmtype;
    }

    public void setRmtype(String rmtype) {
        this.rmtype = rmtype;
    }

    @Basic
    @Column(name = "name", nullable = false, length = 30)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "max_occupancy", nullable = true)
    public Long getMaxOccupancy() {
        return maxOccupancy;
    }

    public void setMaxOccupancy(Long maxOccupancy) {
        this.maxOccupancy = maxOccupancy;
    }

    @Basic
    @Column(name = "match_status", nullable = true)
    public Long getMatchStatus() {
        return matchStatus;
    }

    public void setMatchStatus(Long matchStatus) {
        this.matchStatus = matchStatus;
    }

    @Basic
    @Column(name = "match_info", nullable = true, length = 30)
    public String getMatchInfo() {
        return matchInfo;
    }

    public void setMatchInfo(String matchInfo) {
        this.matchInfo = matchInfo;
    }

    @Basic
    @Column(name = "area", nullable = true, length = 2)
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    @Basic
    @Column(name = "floor", nullable = true, length = 10)
    public String getFloor() {
        return floor;
    }

    public void setFloor(String floor) {
        this.floor = floor;
    }

    @Basic
    @Column(name = "bed_type", nullable = true, length = 70)
    public String getBedType() {
        return bedType;
    }

    public void setBedType(String bedType) {
        this.bedType = bedType;
    }

    @Basic
    @Column(name = "bed_size", nullable = true, length = 30)
    public String getBedSize() {
        return bedSize;
    }

    public void setBedSize(String bedSize) {
        this.bedSize = bedSize;
    }

    @Basic
    @Column(name = "internet", nullable = true, length = 2)
    public String getInternet() {
        return internet;
    }

    public void setInternet(String internet) {
        this.internet = internet;
    }

    @Basic
    @Column(name = "service", nullable = true, length = 300)
    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }

    @Basic
    @Column(name = "window_type", nullable = true)
    public Long getWindowType() {
        return windowType;
    }

    public void setWindowType(Long windowType) {
        this.windowType = windowType;
    }

    @Basic
    @Column(name = "srid", nullable = true)
    public Long getSrid() {
        return srid;
    }

    public void setSrid(Long srid) {
        this.srid = srid;
    }

    @Basic
    @Column(name = "extend", nullable = true, length = 100)
    public String getExtend() {
        return extend;
    }

    public void setExtend(String extend) {
        this.extend = extend;
    }

    @Basic
    @Column(name = "vendor", nullable = true, length = 10)
    public String getVendor() {
        return vendor;
    }

    public void setVendor(String vendor) {
        this.vendor = vendor;
    }

    @Basic
    @Column(name = "is_match", nullable = true, length = 2)
    public String getIsMatch() {

        return isMatch;
    }

    public void setIsMatch(String isMatch) {
        this.isMatch = isMatch;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaobaoXroomtype that = (TaobaoXroomtype) o;

        if (outerRid != null ? !outerRid.equals(that.outerRid) : that.outerRid != null) return false;
        if (rid != null ? !rid.equals(that.rid) : that.rid != null) return false;
        if (rmtype != null ? !rmtype.equals(that.rmtype) : that.rmtype != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (maxOccupancy != null ? !maxOccupancy.equals(that.maxOccupancy) : that.maxOccupancy != null) return false;
        if (matchStatus != null ? !matchStatus.equals(that.matchStatus) : that.matchStatus != null) return false;
        if (matchInfo != null ? !matchInfo.equals(that.matchInfo) : that.matchInfo != null) return false;
        if (area != null ? !area.equals(that.area) : that.area != null) return false;
        if (floor != null ? !floor.equals(that.floor) : that.floor != null) return false;
        if (bedType != null ? !bedType.equals(that.bedType) : that.bedType != null) return false;
        if (bedSize != null ? !bedSize.equals(that.bedSize) : that.bedSize != null) return false;
        if (internet != null ? !internet.equals(that.internet) : that.internet != null) return false;
        if (service != null ? !service.equals(that.service) : that.service != null) return false;
        if (windowType != null ? !windowType.equals(that.windowType) : that.windowType != null) return false;
        if (srid != null ? !srid.equals(that.srid) : that.srid != null) return false;
        if (extend != null ? !extend.equals(that.extend) : that.extend != null) return false;
        if (vendor != null ? !vendor.equals(that.vendor) : that.vendor != null) return false;
        return isMatch != null ? isMatch.equals(that.isMatch) : that.isMatch == null;

    }

    @Override
    public int hashCode() {
        int result = outerRid != null ? outerRid.hashCode() : 0;
        result = 31 * result + (rid != null ? rid.hashCode() : 0);
        result = 31 * result + (rmtype != null ? rmtype.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (maxOccupancy != null ? maxOccupancy.hashCode() : 0);
        result = 31 * result + (matchStatus != null ? matchStatus.hashCode() : 0);
        result = 31 * result + (matchInfo != null ? matchInfo.hashCode() : 0);
        result = 31 * result + (area != null ? area.hashCode() : 0);
        result = 31 * result + (floor != null ? floor.hashCode() : 0);
        result = 31 * result + (bedType != null ? bedType.hashCode() : 0);
        result = 31 * result + (bedSize != null ? bedSize.hashCode() : 0);
        result = 31 * result + (internet != null ? internet.hashCode() : 0);
        result = 31 * result + (service != null ? service.hashCode() : 0);
        result = 31 * result + (windowType != null ? windowType.hashCode() : 0);
        result = 31 * result + (srid != null ? srid.hashCode() : 0);
        result = 31 * result + (extend != null ? extend.hashCode() : 0);
        result = 31 * result + (vendor != null ? vendor.hashCode() : 0);
        result = 31 * result + (isMatch != null ? isMatch.hashCode() : 0);
        return result;
    }
}
